import turtle
def is_out(ts,x,y):
    ts.screen
def euler(angle_interval):
    current_angle = angle_interval
    times = 0
    while True:
        turtle.forward(10)
        turtle.left(current_angle)
        current_angle = current_angle + angle_interval
        if turtle.distance(0, 0) > 800:
            break

        if abs(turtle.pos()) < 1:
            if times > 0:
                break
            times = times + 1
    ts = turtle.getscreen()
    
    ts.getcanvas().postscript(file=f"euler_{angle_interval:03}.eps")
    turtle.clear()

if __name__ == "__main__":
    turtle.speed(0)
    turtle.hideturtle()
    for i in range(33, 360):
        if i % 8 == 0:
            continue
        euler(i)
    turtle.done()
